/**
 * Command.java
 */
package commands;

/**
 * Base class for all other commands, used to comunicate between modules threads.
 * This class is abstract so it is only a base for derived classes.
 * @author Michal Kolodziejski
 *
 */
public abstract class Command {
	
	/**
	 * This enumeration specifies command recivier
	 */
	public enum CommandReceiverType {
		/** Reciver is model */
		MODEL,
		/** Reciver is NC */
		NC, 
		/** Reciver is CONTROLLER */
		CONTROLLER, 
		/** Reciver is GUI*/
		GUI};
	protected final CommandReceiverType commandReceiver;
	
	public Command(CommandReceiverType cr){
		commandReceiver = cr;
	}
	
	/**
	 * Returns information who should receive this command.
	 * @return command receiver
	 */
	public CommandReceiverType getCommandReceiver(){
		return commandReceiver;
	}
}
